import 'babel-polyfill'
import React from 'react'
import { Router, Route, IndexRoute, hashHistory} from 'react-router';
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import configureStore from './redux/store/configureStore'
import './resource/css/app.css'
const store = configureStore();

console.log('index.js ',store,store.getState());

class App extends React.Component {
    
    constructor (props) {
        super(props);
        this.state =  {};
    }

    render() {
        return (
            <Provider store={store}>
                <Router history={hashHistory}>
                  <Route path="/">
                    <IndexRoute component={require('./redux/containers/Home').default}/>  
                    <Route path="reg" component={require('./redux/containers/Login').default}/>
                    <Route path="center" component={require('./redux/containers/Center').default}/>
                  </Route>      
                </Router>
            </Provider>
        )
      }
};

render(<App />, document.getElementById('root'));
